package com.it.sun.learning001.aware;

import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.context.event.SimpleApplicationEventMulticaster;
import org.springframework.stereotype.Component;

/**
 * @ClassName com.it.sun.learning001.aware.ApplicationEventPublisherAwareBean
 * @Author sunmannian
 * @Date 2021/6/15 15:12
 * @Version V1.0
 * Description  <请输入一句话描述该类功能>
 * Copyright (C) 北京中电兴发科技有限公司  since 2021/6/15
 */
@Component
public class ApplicationEventPublisherAwareImpl implements ApplicationEventPublisherAware {

	private ApplicationEventPublisher applicationEventPublisher;

	@Override
	public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
		this.applicationEventPublisher = applicationEventPublisher;
		this.applicationEventPublisher.publishEvent(new Object());
	}
}



